package com.woniuxy.ptapp.client;

import com.woniuxy.commons.util.Result;
import com.woniuxy.ptapp.client.param.CommentParam;
import com.woniuxy.ptapp.client.param.ShowEvaluationParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
@Api(tags = "评价业务接口")
@Component
@FeignClient(value = "yoga-pt",path = "/pt",contextId = "CommentClient")
public interface CommentClient {
    @ApiOperation("评价订单(学员)")
    @PostMapping("/appraise")
    public Result appraise(@RequestBody CommentParam commentParam);

    @ApiOperation("商家回复评价(商家)")
    @GetMapping("/reply")
    public Result reply(@RequestParam Integer classesOrderId,@RequestParam String reply);

    @ApiOperation("查询登录用户的订单评价(教练,场馆,学员)")
    @PostMapping("/showEvaluation")
    public Result<List<ShowEvaluationParam>>  showEvaluation();

    @ApiOperation("测试通知")
    @GetMapping("/test")
    public String test();
}
